import java.util.Scanner;

public class Test2 {
    public static int fib(int n){
        if(n == 1||n == 2){
            return 1;
        }else{
            int f1 = 1;
            int f2 = 1;
            int f3 = 1;
            for (int i = 2; i < n ; i++) {
                f3 = f1 + f2;
                f1 = f2;
                f2 = f3;
            }
            return f3;
        }
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int rec = fib(n);
        System.out.println(rec);
    }
}
